package com.ask.forMe.task;

import com.ask.forMe.service.GroupBuyTeamService;
import com.ask.forMe.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class ExpiredTeamTask {
    @Autowired
    private GroupBuyTeamService groupBuyTeamService;

    //@Scheduled(cron = "0 0/5 * * * ?")  // 每5分钟执行一次
    public void handleExpiredOrders() {
        groupBuyTeamService.processTimeoutTeams();
    }
}
